const express = require('express');

const router = express.Router();

router.route('/getItem').post((req, res, next) => {
    res.send({
        success: 1,
        data: [{
            productName: 'iphone12',
            price: 6899
        }, {
            productName: 'macbook air',
            price: 7999
        }, {
            productName: 'macbook pro',
            price: 18999
        }]
    })
});


router.route('/getList').post((req, res, next) => {
    res.send({
        success: 1,
        data: [{
            productName: 'iphone12',
            price: 6899,
            num: 15
        }, {
            productName: 'macbook air',
            price: 7999,
            num: 50
        }, {
            productName: 'macbook pro',
            price: 18999,
            num: 50
        }]
    })
});


module.exports = router;